package cn.maxhou.sl2.config;

import cn.maxhou.sl1.entity.SysRole;
import cn.maxhou.sl1.entity.SysUser;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;

//定义配置类
public class JavaConfig4 {
    //注册"管理员"角色bean对象
    @Bean
    @Primary
    public SysRole adminRole(){
        SysRole role = new SysRole();
        role.setId(1);
        role.setRoleName("管理员");
        role.setCode("ADMIN");
        return role;
    }
}
